const Product = require('../../db/productSchame');
module.exports = async(req, res) => {
    console.log(req.body.id);
    try {
        await Product.deleteOne({ "_id": req.body.id });
        // 重定向
        res.redirect('/product/productlist');
    } catch (error) {
        res.status(500).send('删除失败' + error)
    }

};